package com.liuyandog;

import com.liuyandog.server.*;
import com.liuyandog.pojo.*;


import javax.swing.*;
import java.awt.*;

public class UserMain extends JFrame{
    private static JTabbedPane view;//选项卡
   static public User user;
    public UserMain(User user){

        super("图书管理系统");
        this.user= user;
        JTabbedPane view = new JTabbedPane();
        UserBookServer book = new UserBookServer();
        UserInfoServer info = new UserInfoServer(user);
        UserBorrowServer borrow = new UserBorrowServer();
        UserRecordServer record = new UserRecordServer();
        view.add(book,"热门图书");
        view.add(info,"个人信息");
        view.add(borrow,"借阅书籍");
        view.add(record,"借阅记录");

        add(view, BorderLayout.CENTER);
        setBounds(200,200,800,600);
        setVisible(true);
        setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
    }
    public static void main(String[] args) {
        new UserMain(new User(1,"1","1","1","1","1","1",1,"1",1,1));
    }
}
